package com.zhuss.controller.core;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.zhuss.bean.bo.core.orign.CreateOrignBo;
import com.zhuss.bean.bo.core.orign.DeleteOrignBo;
import com.zhuss.bean.bo.core.orign.UpdateOrignBo;
import com.zhuss.common.BaseController;
import com.zhuss.common.OperateService;
import com.zhuss.core.orign.OrignOperateServiceExt;
import com.zhuss.exception.AabException;


/**
 * orign操作 controller
 * @Author zhushanshuo
   @Date 2020-02-20 11:58
 *
 */
  
 
@RestController
@RequestMapping("/orign")
public class OrignOperateController extends BaseController {
	
	@Autowired
	@Qualifier("orignOperateService")
	private OperateService<Void, Object> orignOperateService;
	
	@Autowired
	@Qualifier("orignOperateServiceExt")
	private OrignOperateServiceExt orignOperateServiceExt;
	
	/**
	 * 创建
	 * @param bo
	 * @throws AabException
	 */
	@ResponseBody
    @PostMapping("/create")
    public void create(@RequestBody CreateOrignBo bo) throws AabException {
		
		orignOperateService.create(bo);
    }
	
	
	/**
	 * 修改
	 * @param bo
	 * @throws AabException
	 */
	@ResponseBody
    @PostMapping("/update")
    public void update(@RequestBody UpdateOrignBo bo) throws AabException {
		
		orignOperateService.update(bo);
    }
	
	/**
	 * 删除
	 * @param bo
	 * @throws AabException
	 */
	@ResponseBody
    @PostMapping("/delete")
    public void delete(@RequestBody DeleteOrignBo bo) throws AabException {
		
		orignOperateService.delete(bo);
    }
	
}
